Skip to content

feat(UI): add Radix UI table component#1083

Merged
benjamin-747 merged 1 commit into
gitmono-dev:mainfrom
liuyangjuncong20202570:feat/radix-table
Jun 2, 2025
Merged

feat(UI): add Radix UI table component#1083
benjamin-747 merged 1 commit into
gitmono-dev:mainfrom
liuyangjuncong20202570:feat/radix-table

Conversation

@liuyangjuncong20202570

Copy link
Copy Markdown
Contributor

增加:
Radix UI table组件
Radix UI 相关依赖

修改:
CodeView table相关逻辑

@vercel

vercel Bot commented May 31, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2025 10:46am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds Radix UI table support and integrates it into existing code views and page layouts.

  • Introduces @radix-ui/themes dependency and global styles
  • Implements a new RTable component under CodeView/Table and refactors CodeTable.tsx to use it
  • Wraps layouts with Radix Theme provider in relevant pages

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pages/_app.tsx Imports Radix UI theme styles and config constants
pages/[org]/code/tree/[...path]/index.tsx Wraps TreeDetailPage in Theme, refactors formatting
pages/[org]/code/index.tsx Wraps code page in Theme provider
package.json Adds @radix-ui/themes dependency
components/CodeView/Table/index.tsx New Radix-based RTable component
components/CodeView/CodeTable.tsx Switches from Ant Design Table to RTable
components/CodeView/index.tsx Updates imports and formatting
Comments suppressed due to low confidence (2)

moon/apps/web/components/CodeView/Table/index.tsx:5

  • [nitpick] The component is named table but React components should start with an uppercase letter; rename it to Table or RTable for clarity.
const table = <T extends DirectoryType>({

moon/apps/web/pages/[org]/code/tree/[...path]/index.tsx:21

  • [nitpick] Variable new_path uses snake_case; consider using camelCase (newPath) to align with JavaScript naming conventions.
const new_path = '/' + path?.join('/')

Comment on lines +26 to +28
<>
<Table.ColumnHeaderCell>{c.title}</Table.ColumnHeaderCell>
</>

Copilot AI May 31, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each header cell rendered in columns.map is missing a unique key prop; add key={c.key} (or similar) on <Table.ColumnHeaderCell> and remove the unnecessary fragment.

Suggested change
<>
<Table.ColumnHeaderCell>{c.title}</Table.ColumnHeaderCell>
</>
<Table.ColumnHeaderCell key={c.key}>{c.title}</Table.ColumnHeaderCell>

Copilot uses AI. Check for mistakes.
@genedna genedna added dashboard and removed website labels May 31, 2025
@genedna genedna moved this to In review in Mega UI 重构 May 31, 2025
@genedna genedna added this to the 0.2.0 - Web UI milestone May 31, 2025
@benjamin-747
benjamin-747 added this pull request to the merge queue Jun 2, 2025
Merged via the queue into gitmono-dev:main with commit cd65e7a Jun 2, 2025
@github-project-automation github-project-automation Bot moved this from In review to Done in Mega UI 重构 Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants